1. Field of Invention
The invention relates to an embroidery data processing device for processing embroidery data for forming embroidery and a storage medium storing an embroidery data processing program in a sewing apparatus of any sewing machine ranging from industrial sewing machines to sewing machines for household use.
2. Description of Related Art
There is an embroidery sewing machine for, for example, household use that includes many types of embroidery patterns, such as pictures and letters, that are selectably provided and an embroidery pattern selected from them can be formed on work-cloth by a user. According to the above-described sewing machine, embroidery data necessary for executing the embroidery forming operation is stored in a memory, such as a ROM (Read Only Memory), or the like, built into the main body of the sewing machine or an outside ROM card attachably and detachably provided to the sewing machine main body. Further, when the user selects a desired embroidery pattern, embroidery data in correspondence with the embroidery pattern is read from the built-in memory or the outside ROM card.
According to such a sewing machine, when the user selects a desired embroidery pattern, an arrangement and editing screen is displayed on a LCD (Liquid Crystal Display), display device or similar display, provided at, for example, a front face of the sewing machine main body. On the arrangement and editing screen, a layout region showing the sewable region of work-cloth is displayed surrounded by a frame. Further, the selected embroidery pattern is displayed within the layout region in accordance with an image (ratio) for forming the embroidery.
For example, when a pattern of a "dog" is selected, as shown by FIG. 12, the pattern b of the "dog" is displayed at substantially the central portion in the layout region a. Further, the user can arrange and edit the pattern by rotating the pattern or by operating an operating unit while viewing the arrangement and editing screen. In this case, the arrangement and editing processing is carried out based on a mask M having a rectangular frame shape surrounding the pattern b. The mask M is displayed based on mask data comprising a combination of a minimum value of x coordinate and a minimum value of y coordinate and a maximum value of x coordinate and a maximum value of y coordinate, among coordinates of the outer shape of the pattern b. In this way, the size of the mask data is smaller than that of embroidery data and accordingly, the processing of arrangement and edition can swiftly be executed.
Meanwhile, a change in the arrangement of the pattern is feasible only within the layout region a. Therefore, when the arrangement of the pattern is instructed, it is determined whether the pattern after the change is confined in the layout region a. In this case, it can easily be determined by comparing coordinates of the apexes of the four corners of the mask M of the changed arrangement with the coordinates of the apexes of the four corners of the layout region a.
However, when the arrangement of the pattern is changed based on the mask M in this way and the determination of whether the pattern is confined in the layout region a is carried out based on the mask M after the change, the following problem is posed. That is, for example, when the pattern b in the state shown by FIG. 12 is rotated by 45 degrees and thereafter moved downwardly, as shown in FIG. 13, although the pattern b is remote from a lower side of the layout region a by a dimension L, when one apex of the mask M reaches the lower side of the layout region a, further movement is not feasible. That is, there poses a problem in which the range of possible arrangements of the pattern b within the layout region a is narrower than the range that is possible if actually arranging the pattern b. Such a problem is posed when the pattern b is rotated to a rotational angle at which the four sides of the mask M are not in parallel with four sides of the frame indicating the layout region a.